<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ex" uri="/WEB-INF/tld/showInformation.tld"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta charset="UTF-8">
    <title>薪酬管理系统--管理员</title>
    <link rel="stylesheet" type="text/css"
          href="/resources/css/styleSheet.css">
    <link rel="stylesheet"
          href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
          integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N"
          crossorigin="anonymous">
    <link
            href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"
            rel="stylesheet">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script
            src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body style="padding-top: 10%;background-size: cover;">
<ex:Banner/>
<!-- 这里之后改一下 -->
<c:if test="${not empty admin}">


    <!--页面中心内容-->
    <div class="row">
        <div class="col-sm-2">
            <!--菜单组件：手风琴 panel-group容器-->
            <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
                <!--面板-->
                <div class="panel panel-default">
                    <div class="panel-heading" role="tab" id="headingOne">
                        <h4 class="panel-title">
                            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
                                员工管理
                            </a>
                        </h4>
                    </div>
                    <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
                        <div class="panel-body">
                            <!--嵌套列表组-->
                            <ul class="list-group">
                                <li class="list-group-item"><a href="http://localhost:8080/admin/checkAllEmployees">员工信息</a></li>
                                <li class="list-group-item"><a href="${pageContext.request.contextPath}/admin/payForEmployees">薪资发放</a></li>
                                <li class="list-group-item"><a href="${pageContext.request.contextPath}/admin/checkAllSalary">薪资列表</a></li>
                            </ul>
                        </div>
                    </div>
                </div>

                <!--面板-->
                <div class="panel panel-default">
                    <div class="panel-heading" role="tab" id="empTitle">
                        <h4 class="panel-title">
                            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#empContent" aria-expanded="true" aria-controls="collapseOne">
                                部门管理
                            </a>
                        </h4>
                    </div>
                    <div id="empContent" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
                        <div class="panel-body">
                            <!--嵌套列表组-->
                            <ul class="list-group">
                                <li class="list-group-item"><a href="${pageContext.request.contextPath}/admin/checkAllDepart">部门信息</a></li>
                                <li class="list-group-item"><a href="${pageContext.request.contextPath}/admin/getOneInfo">部门结构</a></li>

                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-sm-10">
            <div class="row">
                <div class="col-8">
                    <div class="alert" id="messageAlert" role="alert">
                            ${message.message}
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">×</span>
                        </button>
                    </div>
                </div>
            </div>

            <div class="d-flex justify-content-center" style="margin-top: 30px">
                <div class="col-sm-5">
                    <jsp:include page="dChart.jsp"/>
                </div>
                <div class="col-sm-5">
                    <jsp:include page="eChart.jsp"/>
                </div>
            </div>



        </div>
    </div>
</c:if>

<div style="height: 300px">

</div>

<!--统一的尾部：版权信息-->
<ex:Footer/>

<!-- jQuery and JavaScript Bundle with Popper -->
<script
        src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
        crossorigin="anonymous"></script>
<script
        src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
        crossorigin="anonymous"></script>
<script
        src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.min.js"
        crossorigin="anonymous"></script>
<script type="text/javascript" src="script.js"></script>
<script>
    $(document).ready(function() {
        if ('${message.message}') {
            if ('${message.status}' == 0) {
                $('#messageAlert').addClass('alert-danger');
            } else if ('${message.status}' == 1) {
                $('#messageAlert').addClass('alert-success');
            }
            $('#messageAlert').show();
        } else {
            $('#messageAlert').hide();
        }
    });
</script>

</body>
</html>

